<?php

/**
 * Created by PhpStorm.
 * User: lihao
 * Date: 2017/9/6
 * Time: 下午12:51
 */
class Photo_model extends CI_Model
{
    public function getPhotots($limit = null, $type) {
        if ($limit != null) {
            $this->db->limit($limit);
        }
        $this->db->where('picid', $type);
        $this->db->order_by('imgid', 'DESC');
        $result = $this->db->get('images')->result_array();
        return $result;
    }
}